#define  _CRT_SECURE_NO_WARNINGS 1#include<stdio.h>
#include<stdio.h>

int dayin(int a)
{
	while (a != 0)
	{
		int i = 0;
		i = a % 10;
		printf("%d\n", i);
		return dayin(a / 10);
	}
}

int main()
{
	int a = 0;
	scanf("%d", &a);
	dayin(a);
	return 0;
}